<style>
@media (min-width: 1200px){
    .col-lg-1 {
        width: 7.5%;
    }  
}
</style>
{include file="material/_date" /}
<input type="hidden" name="platform_ids" value="{:input('get.platform_ids')}">
<div class="col-sm-12 col-md-4 col-lg-2">
    <input type="text" class="form-control" name="keyword" value="{$keyword|default=''}" placeholder="请输入关键字搜索">
</div>

<div class="col-sm-12 col-md-1" style="width: 59px;">
    <button class="btn btn-primary" type="submit">搜索</button>
</div>

<!-- 工作台只显示下级员工 -->
{if stristr($action,'mycenter') }
<div class="col-sm-12 col-lg-1">
    <select name="uid" id="uid" class="form-control">
        <option value="0">全部工号</option>
        {foreach name="userlist2" item="vo" key="k" }
        <option value="{$k}" {if input('get.uid')==$k}selected {/if}>{$vo}</option>
        {/foreach}
    </select>
</div>
{else/}
<!-- 公众库显示全部员工 -->
<div class="col-sm-12 col-lg-1">
    <select name="uid" id="uid" class="form-control">
        <option value="0">全部工号</option>
        {foreach name="userlist" item="vo" key="k" }
        <option value="{$k}" {if input('get.uid')==$k}selected {/if}>{$vo}</option>
        {/foreach}
    </select>
</div>
{/if}
<div class="col-sm-12 col-lg-1">
    <select name="channel" id="channel" class="form-control">
        <option value="999999">频道</option>
        <option value="1" {if input('get.channel')==1}selected {/if}>男频</option>
        <option value="2" {if input('get.channel')==2}selected {/if}>女频</option>
    </select>
</div>

<div class="col-sm-12 col-lg-1">
    <select name="category_id" id="category_id" class="form-control">
        <option value="0">分类</option>
        {foreach name="dataArr['category_id']" item="vo" key="k" }
        <option value="{$vo.id}" {if input('get.category_id')==$vo['id']}selected {/if} >{$vo.name}</option>
        {/foreach}
    </select>
</div>

<div class="col-sm-12 col-lg-1">
    <select  id="pub_sort" class="form-control">
        <option value="1" {if input('get.pub_sort')=='1'}selected {/if}>按时间排序</option>

        
        <option value="4" {if input('get.pub_sort')=='4'}selected {/if}>下载从高到低</option>
        <option value="5" {if input('get.pub_sort')=='5'}selected {/if}>下载从低到高</option>
        <option value="2" {if input('get.pub_sort')=='2'}selected {/if}>评分从高到低</option>
        <option value="3" {if input('get.pub_sort')=='3'}selected {/if}>评分从低到高</option>



        <option value="8" {if input('get.pub_sort')=='8'}selected {/if}>量级从高到低</option>
        <option value="9" {if input('get.pub_sort')=='9'}selected {/if}>量级从低到高</option>
    </select>
</div>


<!-- 只有工作台下-抖音才能选择模板 -->
{if $action == 'wenan-mycenter_1_1' && $platform_id == 3}
<div class="col-sm-12 col-lg-1">
    <select name="mb" id="mb" class="form-control">
        <option value="1" {if $mb=='1'}selected {/if}>中图标排列</option>
        <option value="2" {if $mb=='2'}selected {/if}>小图标排列</option>
        <option value="3" {if $mb=='3'}selected {/if}>大图标排列</option>
    </select>
</div>
{/if}

<script>
    $(() => {
        $('#uid').change(() => {
            window.location.href='{$jumpurl}'+"&uid="+$('#uid option:selected').val();
        });
        $('#channel').change(() => {
            window.location.href='{$jumpurl}'+"&channel="+$('#channel option:selected').val();
        });
        $('#category_id').change(() => {
            window.location.href='{$jumpurl}'+"&category_id="+$('#category_id option:selected').val();
        });
        //下拉排序
        $('#pub_sort').change(() => {
            var pub_sort = $('#pub_sort option:selected').val();
            window.location.href='{$jumpurl}&pub_sort='+pub_sort;
        });

        $('#mb').change(() => {
            window.location.href='{$jumpurl}'+"&mb="+$('#mb option:selected').val();
        });

    });

</script>